package com.example.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.example.domain.StudentAttendance;

@Repository
public interface StudentAttendanceDao extends JpaRepository<StudentAttendance, Integer> {

    @Transactional
    @Modifying
    Integer deleteByStudentAttendanceId(Integer studentAttendanceId);

    List<StudentAttendance> findByStudentAttendanceId(Integer studentAttendanceId);

    @Transactional
    @Modifying
    Integer deleteByStudentAttendanceIdIn(List<Integer> listId);

}
